﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<style type="text/css">
    .table_search td {
        padding-right: 5px;
    }
</style>
<table class="table_search">
    <tr>
        <td>
            <button type="button" id="btnRefresh" class="layui-btn layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>刷 新
            </button>
        </td>
        <td>
            <button id="addAdminBtn" type="button" class="layui-btn layui-btn-sm">
                <i class="layui-icon layui-icon-add-1"></i>创建新用户
            </button>
        </td>
    </tr>
</table>

<div style="margin-top: 10px;">
    <table class="layui-hide" id="Table" lay-filter="admin"></table>
</div>

<style type="text/css">
    .toolbar_link {
        margin-left: 2px;
    }
</style>
<script type="text/html" id="tableToolBar">
    {{# if(d.IsAdmin == false){  }}
    <a class="layui-btn layui-btn-xs" lay-event="update" style="margin-left:2px;">修 改</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete" style="margin-left:2px;">删 除</a>
    {{# } }}
    <a class="layui-btn layui-btn-xs layui-bg-orange" lay-event="reset" style="margin-left:2px;">重设密码</a>
</script>

<style type="text/css">
    .addAdminTable {
        margin: 15px;
    }

        .addAdminTable td {
            padding: 5px;
        }
</style>
<div id="addAdminDialog" style="display: none;">
    <form class="layui-form" action="">
        <table class="addAdminTable">
            <tr>
                <td align="right">关联店铺:</td>
                <td>
                    <select name="selAddAdmin" lay-verify="required"
                            lay-reqtext="请选择店铺" lay-vertype="tips">
                        <option value="">请选择</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="right">用户名:</td>
                <td>
                    <input type="text" class="layui-input" lay-verify="required|username"
                           value="" lay-vertype="tips" maxlength="20" name="txtAddDlg_UserName" lay-reqtext="请输入用户名">
                </td>
            </tr>
            <tr>
                <td align="right">密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|password"
                           value="" lay-vertype="tips" maxlength="20" name="txtAddDlg_Pwd" lay-reqtext="请输入密码">
                </td>
            </tr>
            <tr>
                <td align="right">姓名:</td>
                <td>
                    <input type="text" class="layui-input" lay-verify="required|name"
                           value="" lay-vertype="tips" maxlength="10" name="txtAddDlg_Name" lay-reqtext="请输入姓名">
                </td>
            </tr>
            <tr>
                <td align="right" style="height:30px;" valign="middle">&nbsp;&nbsp;</td>
                <td align="right" valign="middle">
                    <button class="layui-btn" lay-submit="" lay-filter="filter-AddAdminBtn">确定</button>
                </td>
            </tr>
        </table>
    </form>
</div>

<style type="text/css">
    .resetPwdDialog {
        margin: 15px;
    }

        .resetPwdDialog td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ResetPwdDialog">
    <form class="layui-form" action="">
        <table class="resetPwdDialog">
            <tr>
                <td align="right">原密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|pwd"
                           lay-vertype="tips" maxlength="20" id="txtResetPwd" lay-reqtext="请输入原密码">
                </td>
            </tr>
            <tr>
                <td align="right">新密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|pwd"
                           lay-vertype="tips" maxlength="20" id="txtResetNewPwd" lay-reqtext="请输入新密码">
                </td>
            </tr>
            <tr>
                <td align="right">确认新密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|pwd|pwd2"
                           lay-vertype="tips" maxlength="20" id="txtResetNewPwd2" lay-reqtext="请输入确认新密码">
                </td>
            </tr>
            <tr>
                <td align="right">&nbsp;&nbsp;</td>
                <td align="right">
                    <button class="layui-btn" id="ResetPwdBtn" lay-submit="" lay-filter="filter-reset">确定</button>
                </td>
            </tr>
        </table>
    </form>
</script>

<script type="text/javascript" src="~/Static/Js/admin.js"></script>